Computer virtualization is a technique that involves encapsulating a physical computing machine platform into a virtual machine that is executed under the control of virtualization software running on a hardware computing platform, or “host.” A virtual machine has both virtual system hardware and guest operating system software. Virtual system hardware typically includes at least one “virtual disk,” a single file or a set of files that appear as a storage drive to the guest operating system. Virtual disk files are typically stored on a physical storage device or logical storage container (generally referred to as a “datastore”). Virtual machines (or VMs) use the virtual disk in the same manner that a physical storage drive is used, to store the guest operating system, application programs, and application data.
Virtualization software, also referred to as a hypervisor, manages the guest operating system's access to the virtual disk and maps the virtual disk to the underlying physical storage datastore. Datastores may be backed by standalone disk devices, a storage area network (SAN), or network attached storage (NAS), which may contain several physical storage units. Allocating physical storage space for virtual disks corresponding to virtual machines in an organization's data center can stress the physical storage space capacity of the data center. For example, when provisioning a virtual disk for a virtual machine, the virtualization software may allocate all the physical disk space for the virtual disk at the time the virtual disk is initially created. However, such an allocation, referred to as “thick provisioning” may result in storage inefficiencies because the physical storage space allocated for the virtual disk may not be timely used (or ever used) by the virtual machine.
An alternative provisioning method, referred to as “thin provisioning,” dynamically allocates physical storage space to a virtual disk only when such physical storage space is needed by the virtual machine and not necessarily when the virtual disk is initially created.
Both thickly and thinly provisioned virtual disks are allocated from storage space of datastores. Because multiple virtual machines (or other applications) demand and compete for storage space on datastores, there is a chance that a particular virtual machine, whether thickly or thinly provisioned, will not have its storage requirements met by the datastore to which it is allocated. For example, if a thinly provisioned virtual machine requests additional virtual disk space and the required amount of physical disk space is not available on the datastore to which the virtual disk is initially allocated, the virtual machine will likely fail or become stopped in a “hung” state. In some cases, a system administrator would need to manually allocate additional storage to the datastore to enable the virtual disk of the virtual machine to “grow,” as required. Allocation of additional storage to a datastore may be done through either an “extend” operation or an “extent” operation. An extend operation grows an existing storage “extent” (or partition) of the datastore by allocating additional storage space to the extent out of free storage space that is adjacent to the extent. An extent operation is performed by adding additional extents (or partitions) to the datastore. Once the additional storage is allocated to the datastore on which the virtual disk resides, the size of virtual disk may then be increased.
However, there are situations when all extents of a datastore are fully allocated and no additional extents are available to be allocated to the datastore. Thus, extend and extent operations are precluded. In such a case, the file that implements the virtual disk cannot be extended. Hence the virtual machine runs out of storage and fails.